package com.gxgy.controller;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.gxgy.base.BaseAllInterface;
import com.gxgy.entity.Teacher;
/**
 * @description: 教师表 接口
 * @author: Qin Fengang
 * @date: 2021-11-19
 */
@Controller
public class TeacherController extends BaseAllInterface {
	
	/**
	 * @description: 教师表 查询所有
	 * @author: Qin Fengang
	 * @date: 2021-11-19
	 */
	@RequestMapping("/teacherList")
	public String teacher(Model model) {
		List<Teacher> teacher = teacherService.queryAllTeacher();
		model.addAttribute("teacher",teacher);
		return "page/teacher/teacher";
		
	}
	
	@RequestMapping("/teacherAdd")
	public String teacherAdd() {
		return "page/teacher/teacherAdd";
	}

}
